import request from '@/utils/request'

// 查询工厂建模列表
export function getTreeList(query) {
  return request({
    url: '/base/shop/list',
    method: 'get',
    params: query
  })
}


// 查询工厂建模树结构
export function treeselect() {
  return request({
    url: '/base/shop/treeselect',
    method: 'get'
  })
}

// 查询工厂模型详细
export function getShop(shopId) {
  return request({
    url: '/base/shopConfig/' + shopId,
    method: 'get'
  })
}
// 新增工厂
export function addShop(data) {
  return request({
    url: '/base/shopConfig',
    method: 'post',
    data: data
  })
}

// 修改工厂
export function updateShop(data) {
  return request({
    url: '/base/shopConfig',
    method: 'put',
    data: data
  })
}

// 删除工厂
export function delShop(shopId) {
  return request({
    url: '/base/shopConfig/' + shopId,
    method: 'delete'
  })
}
